package cn.humaohua.study.yanmo_design_pattern.ch10.va;

public class CDDriver extends Colleague {

    private String data;

    public CDDriver(Mediator mediator) {
        super(mediator);
    }

    /**
     * 同事类，只做自己的事，由中介者决定下一步怎么做
     */
    public void readCD() {
        data = "设计模式,值得好好研究";
        this.getMediator().changed(this);
    }

    public String getData() {
        return this.data;
    }

}
